package org.example.notificationservice.entity;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import java.time.LocalDateTime;
import java.util.Map;

@Data
@Document(collection = "notifications")
public class Notification {
    @Id
    private String id;
    private String userId;
    private String title;
    private String content;
    private NotificationType type;
    private NotificationStatus status;
    private NotificationPriority priority;
    private Map<String, Object> metadata;
    private LocalDateTime createdAt;
    private LocalDateTime scheduledAt;
    private LocalDateTime sentAt;

    public enum NotificationType {
        EMAIL,
        SMS,
        SYSTEM_MESSAGE,
        PUSH
    }

    public enum NotificationStatus {
        PENDING,
        SCHEDULED,
        SENT,
        FAILED,
        CANCELLED
    }

    public enum NotificationPriority {
        LOW,
        MEDIUM,
        HIGH,
        URGENT
    }
}